package DailyPractice.Day18;

import java.util.Scanner;

/**
 * @author lumin
 * @date 2022/05/13 19:11
 **/
public class Num1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if(n == 1){
            System.out.println(1);
        }
        if(n == 2){
            System.out.println(1);
        }
        int p = 0, q = 0, r = 1;
        for (int i = 2; i <= n; ++i) {
            p = q;
            q = r;
            r = (p + q);
        }
        System.out.println(r);
    }
}